package nc.ui.ar.noticear;

import java.util.Map;

import nc.ui.arap.service.IRemoteCallItem;
import nc.vo.arap.debtage.TimecontrolVO;
import nc.vo.arap.service.ServiceVO;
import nc.vo.pub.BusinessException;

public class NoticeTimeQueryCall implements IRemoteCallItem {
	
	protected ServiceVO serviceVO=null;
	
	private String code;
	
	private String pkey;
	
	private NoticeArUI ui;
	
	public NoticeTimeQueryCall(String pkey, NoticeArUI ui) {
		this.pkey = pkey;
		this.ui = ui;
	}

	public ServiceVO getServiceVO() {
		if(serviceVO==null){
			serviceVO = new ServiceVO();
			serviceVO.setClassname("nc.itf.uap.bd.timecontrol.ITimeControlQuery");
			serviceVO.setMethodname("queryTimecontrolVOByPk");
			serviceVO.setParamtype(new Class[] {String.class});
			serviceVO.setParam(new Object[] {pkey});
			code = serviceVO.getCode();
		}
		return serviceVO;
	}

	public void handleResult(Map<String, Object> datas)
			throws BusinessException {
		TimecontrolVO vo =(TimecontrolVO) datas.get(code);
		ui.setTimecontrolVO(vo);

	}

}
